#!/usr/bin/perl 
#gensym.pl
use warnings;
use strict;

use Symbol;
	
my $fh = gensym;
open $fh, "> newfile.txt";
print $fh "some text";
close $fh;